package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.pricecheck.PriceCheckEntity;
import com.sgb.kjwl.model.entity.pricecheck.PriceCheckListEntity;
import com.sgb.kjwl.model.entity.pricecheck.SupplierEntitiy;
import com.sgb.kjwl.model.entity.shopping.ShopPriceInfo;
import com.sgb.kjwl.model.entity.transport.EnquiryDtailEntity;
import com.sgb.kjwl.model.entity.transport.GoodsInfoTypeEntity3;
import com.sgb.kjwl.model.entity.transport.MapLongAndLatEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.ListResponse;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.PATCH;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @author cyj
 * 商品询价相关API
 */
public interface ProductInquiryAPI {

    /**
     * 删除询价
     * @param no
     * @return
     */
    @POST("v1/app/user/goods/enquiry/enquiryDelete")
    Call<BaseEntity<Object>> enquiryDelete(@Query("no") String no);

    /**
     * 取消询价
     * @param no
     * @return
     */
    @GET("v1/app/user/goods/enquiry/enquiryCancel/{no}")
    Call<BaseEntity<Object>> enquiryCancel(@Path("no") String no);

    /**
     * 询价发布
     * @param priceCheckEntity
     * @return
     */
    @POST("v1/app/user/goods/enquiry/goodsEnquiryPublish")
    Call<BaseEntity<Object>> publishPriceCheck(@Body PriceCheckEntity priceCheckEntity);

    /**
     * 我的询价列表
     * @param tcatName
     * @param page
     * @param limit
     * @param status
     * @return
     */
    @FormUrlEncoded
    @POST("v1/app/user/goods/enquiry/myEnquiryList")
    Call<BaseEntity<ListResponse<List<PriceCheckListEntity>>>> getPriceCheckList(@Field("tcatName") String tcatName, @Field("page") int page, @Field("limit") int limit, @Field("status") int status);

    /**
     * 询价详情
     * @param goodsSourceNo
     * @return
     */
    @POST("v1/app/user/goods/enquiry/enquiryDtail")
    Call<BaseEntity<EnquiryDtailEntity>> enquiryDtail(@Query("no") String goodsSourceNo);

    /**
     * 卸车方式
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getUnloadRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getUnLoadDemand();

    /**
     * 询价方式
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getEnquiryType")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getPriceCheckDemand();

    /**
     * 支付方式
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getPayWay")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getPayWay();

    /**
     * 会员询价  发布询价-会员询价-获取当前用户的供方会员
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getSupplierMember")
    Call<BaseEntity<List<SupplierEntitiy>>> getSupplierMember();

    /**
     * 装车方式  装车要求
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getLoadingRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getLoadDemand();

    @GET("v1/app/common/getUrlSetting")
    Call<BaseEntity<IMServiceAPI.GetUrlSettingEntity>> getUrlSetting(@Query("param") String param);

    /**
     * 运货要求
     * @return
     */
    @POST("v1/app/user/goods/enquiry/getDeliveryRequire")
    Call<BaseEntity<List<GoodsInfoTypeEntity3>>> getDeliverDemand();

    /**
     * 获取地址经纬度
     * @param areaCode
     * @param provinceNo
     * @param cityNo
     * @param districtNo
     * @return
     */
    @POST("v1/app/logistics/getAddressCoordinate")
    Call<BaseEntity<MapLongAndLatEntity>> getLocationLL(@Query("areaCode") String areaCode, @Query("provinceNo") String provinceNo, @Query("cityNo") String cityNo, @Query("districtNo") String districtNo);

    /**
     * 报价详情查询
     * @param no
     * @return
     */
    @GET("v1/app/user/goods/quote/quoteGoodsInfo")
    Call<BaseEntity<ShopPriceInfo>> getQuoteGoodsInfo(@Query("no") String no);
}
